﻿#region Using Directives

    using System;

    using Csla;

    using MarketPulse.BusinessLogic.Core;
using MarketPulse.BusinessLogic.Common.Criteria;

#endregion

namespace MarketPulse.BusinessLogic.Common
{
    /// <summary>
    /// This class represents a collection of read-only EnquiryTypes
    /// </summary>
    [Serializable]
    [Csla.Server.ObjectFactory("MarketPulse.DataAccess.Factory.EnquiryFactory, MarketPulse.DataAccess.Factory", "FetchTypeInfoList")]
    public class EnquiryTypeInfoList : MarketPulseReadOnlyListBase<EnquiryTypeInfoList, EnquiryTypeInfo>
    {

        #region Constructors

            /// <summary>
            /// Default constructor is private in order to (try to) enforce construction
            /// only via the static factory methods provided.
            /// </summary>
            private EnquiryTypeInfoList()
            {
            }

        #endregion

        #region Methods

            #region Factory Methods

                /// <summary>
                /// Method used to get a read only list of read only EnquiryTypes that are associated with a particular Client (via the DataPortal client proxy)
                /// </summary>
                /// <param name="clientGuid">The Company Guid used to retrieve the EnquiryTypeInfo list</param>
                /// <returns>A populated read only list of read only EnquiryTypes</returns>
                public static EnquiryTypeInfoList GetByClientGUID(Guid clientGuid)
                {
                    return DataPortal.Fetch<EnquiryTypeInfoList>(new SingleCriteria<Guid>(clientGuid));
                }

            #endregion

        #endregion
    }
}
